from pywinauto.application import Application
import time

from pywinauto.findwindows import find_elements

# app = Application(backend="uia").start("notepad.exe")
# app = Application(backend="uia").connect(path=r"C:\Program Files\Notepad++\notepad++.exe")
# app = Application(backend="uia").connect(path=r"D:\soft\finance\eastmoney\maintrade.exe")
app = Application(backend="uia").connect(title_re='网上股票交易系统')
# window = app.windows()[0]
# print(app.windows()[0])
dlg = app.window()
ele = dlg['卖出[F2]']
ele.click_input()
ele.print_control_identifiers()
# dlg.print_control_identifiers()
# print(dlg)
# dlg.print_control_identifiers()
# ele = dlg['工作区']
# dlg.child_window()
# ele.print_control_identifiers()
# print(ele)
